<template>
    <div :class="$style.warp">
        <div id="hello-vue" :class="$style.demo">
            <h2>{{ title }}</h2>
        </div>
        <div :class="$style.block">kkkkkkkkkkkkkkkkkkkk</div>
        <button :class="$style.btn" @click="onBtnClick">{{ btnText }}</button>
    </div>

</template>

<script lang="ts">
import * as Data from '../data/data';

export default {
    data() {
        return {
            title: '换装 测试',
            btnText: '点我换衣服'
        }
    },
    methods: {
        onBtnClick() {
            this.btnText += '1';
            Data.outfitIndex.value++;
            Data.outfitIndex.value%=2;
        }
    }

}
</script>

<style module>
.warp {
    pointer-events: all;
}

.demo {
    font-size: 36px;
    color: aqua;
}

.block {
    width: 15rem;
    height: 3rem;
    background: #ff0000;
}

.btn {
    width: 8rem;
    height: 2rem;
    background: #00ff00;
}

.btn:hover {
    background: #0000ff;
}
</style>